Skip to content

chore(ci): declare explicit permissions for read-default rollout#439

Merged
zdenko-kovac merged 1 commit into
mainfrom
chore/explicit-permissions-publish-uploads
May 26, 2026
Merged

chore(ci): declare explicit permissions for read-default rollout#439
zdenko-kovac merged 1 commit into
mainfrom
chore/explicit-permissions-publish-uploads

Conversation

@zdenko-kovac
Copy link
Copy Markdown
Member

What

Declare explicit permissions: contents: write on the two release-asset upload workflows so they keep working after the org-wide flip to read-default GITHUB_TOKEN.

Workflows touched:

  • .github/workflows/publish-clm.yaml
  • .github/workflows/publish-scaffold.yaml

Why

OSPO hardening — Finding 1: restrict_default_workflow_permissions = true will be enabled fleet-wide on the SAP CS-DevOps OSPO repo set. Both workflows upload binaries to the release via curl -H "Authorization: Bearer \${{ secrets.GITHUB_TOKEN }}" to upload_url. Asset upload requires contents: write; without it the curl will 403 under the read-only default.

Risk

Low. Token scope is narrowed (was implicit write-everything; becomes contents: write only). Behavior unchanged on the happy path.

Test plan

  • Next real release publishes both clm-* and the scaffold archive without 403.

The publish-clm.yaml and publish-scaffold.yaml workflows upload release
binaries via curl using the default GITHUB_TOKEN. Once the org-wide flip
to read-default GITHUB_TOKEN lands, the asset upload requests will 403
unless the workflows explicitly declare contents: write.

This narrows the token's effective scope (was implicit write-everything;
becomes contents:write only) without changing happy-path behavior.
@zdenko-kovac zdenko-kovac merged commit a7ab384 into main May 26, 2026
8 checks passed
@zdenko-kovac zdenko-kovac deleted the chore/explicit-permissions-publish-uploads branch May 26, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants